package com.neuedu.controller;

import com.neuedu.common.ResultJson;
import com.neuedu.entity.DrugInfo;
import com.neuedu.service.DrugInfoService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 药品表 前端控制器
 * </p>
 *
 * @author LiYang
 * @since 2024-11-19
 */
@RestController
@RequestMapping("/drugInfo")
public class DrugInfoController {
    @Resource
    DrugInfoService drugInfoService;

    /**
     * 查询药品信息
     */
    @GetMapping("/list")
    ResultJson<List<DrugInfo>> list(String drugName, String mnemonicCode) {
        return ResultJson.success(drugInfoService.list(drugName, mnemonicCode));
    }
}
